package com.xb.mapper;
import com.xb.domain.User;
import com.xb.domain.UserExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
/**
 * @author zch
 */
public interface UserMapper {
	long countByExample(UserExample example);
	int deleteByExample(UserExample example);
	int deleteByPrimaryKey(@Param("host") String host, @Param("user") String user);
	int insert(User record);
	int insertOrUpdate(User record);
	int insertOrUpdateSelective(User record);
	int insertSelective(User record);
	int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
	int updateByExample(@Param("record") User record, @Param("example") UserExample example);
	int updateByPrimaryKeySelective(User record);
	int updateByPrimaryKey(User record);
	int updateBatch(List<User> list);
	int batchInsert(@Param("list") List<User> list);
	/**
	 *  实体类参数查询用户
	 * @param example UserExample
	 * @return List<User>
	 */
	List<User> selectByExample(UserExample example);
	/**
	 * 根据 host 和 username 查询用户
	 * @param host host
	 * @param user user
	 * @return User
	 */
	User selectByPrimaryKey(@Param("host") String host, @Param("user") String user);
	/**
	 * 查询所有用户
	 * @return List<User>
	 */
	List<User> selectAllUserList();
}